package com.liu.action;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.ui.Model;

import com.liu.dao.PersonDao;
import com.liu.model.Person;

public class PersonAction {
	PersonDao dao = new PersonDao();

	public List<Person> query(String name) throws Exception {
		return dao.query(name);
	}

	public void dlt(int id) throws Exception {
		dao.dlt(id);
	}

	public void add(Person p) throws SQLException {
		dao.add(p);
	}
	
	public Person find(Integer id)throws Exception{
		return dao.find(id);
	}
	
	public Integer findid() throws Exception{
		return dao.findid();
	}
	public List<Person> showPersonByPage(Integer startPos,Integer pageSize){
		return dao.showPersonByPage(startPos,pageSize);
	}
	public int personCount(){
		return dao.getPersonCount();
	}
}
